<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%   
String path = request.getContextPath();   
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";   
%> 
<h2 class="tl"><a href="u/index.html">${user.name}</a></h2>
<div class="img">
	<c:if test="${user.headImg==null or user.headImg=='' }">
		<img class="img-polaroid" src="upload/head/default.jpg" height=160 width=160 />
	</c:if>
	<c:if test="${user.headImg!=null and user.headImg!='' }">
		<img class="img-polaroid" src="upload/head/${user.headImg }" height=160 width=160 />
	</c:if>
</div>
<div class="profile">
	<p><b>${user.name}</b>&nbsp;&nbsp;${user.profession }<c:if test="${user.profession==null or user.profession=='' }">游民</c:if></p>
</div>
<div class="attension-action">
	<c:choose>
		<c:when test="${relationType==-1 or relationType==1 }">
			<a class="btn btn-small btn-success" onclick="addAttension(${sessionScope.user.id+0 },${user.id },this)"><i class="icon-plus icon-white"></i>关注</a>
		</c:when>
		<c:when test="${relationType==2 }">
			<span><i><img src='img/each.gif'/></i>相互关注</span>&nbsp;|&nbsp;
			<a class="btn-link" onclick="removeAttension(${sessionScope.user.id+0 },${user.id },this)">取消</a>
		</c:when>
		<c:when test="${relationType==0 }">
			<a class="btn btn-small" onclick="removeAttension(${sessionScope.user.id+0},${user.id },this)">取消关注</a>
		</c:when>
	</c:choose>
</div>
<div class="tongji">
	<div>
		<p class="t">${user.followNum+0 }</p>
		<p class="b">关注</p>
	</div>
	<div>
		<p class="t">${user.fansNum+0 }</p>
		<p class="b">被关注</p>
	</div>
	<div>
		<p class="t">${user.articleNum+user.answersNum }</p>
		<p class="b">记录</p>
	</div>
</div>
<ol class="unstyled">
	<li>
		<a href="c/answer/${user.id }.html"><i class="icon-edit"></i>&nbsp;答案</a>
	</li>
	<li>
		<a href="c/self/${user.id }.html"><i class="icon-comment"></i>&nbsp;我的短文</a>
	</li>
</ol>
<hr/>
<ol class="unstyled">
  <li>
		<a href="c/follow/${user.id }.html"><i class="icon-edit"></i>&nbsp;关注</a>
	</li>
	<li>
		<a href="c/fans/${user.id }.html"><i class="icon-comment"></i>&nbsp;粉丝</a>
	</li>
</ol>

